import { GET, POST, DELETE } from '../http/Api'

const CommonServer = {
    loadLoginCode: (data) => GET('/user/code', data),
    doLogin: (data) => POST('/user/login', data),
    register: (data) => POST('/user/register', data),
    updateUserInfo: (data) => POST('/user/update/userInfo', data),
    uploadImage: (data) => POST('/system/image/upload', data),
    mergeImage: (data) => POST('/system/image/merge', data),
    deleteImage: (data) => DELETE(`/system/image/delete/${data.hash}`, data),
    uploadImageList: (data) => POST(`/image/add/url`, data),
    loadImageByRefGuid: (data) => POST(`/image/find/all`, data),
    deleteImageByGuid: (data) => POST(`/image/delete/hash`, data),
}

export default CommonServer